package com.xiaoq.route.sites.service.impl;

import com.xiaoq.route.sites.entity.RoutePointSitesEntity;
import com.xiaoq.route.sites.entity.SitesRouteEntity;
import com.xiaoq.route.sites.repository.ISitesRouteRepository2;
import com.xiaoq.route.sites.service.ISitesRouteService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SitesRouteService2Impl implements ISitesRouteService2 {

    @Autowired
    private ISitesRouteRepository2 iSitesRouteRepository;

    @Override
    public void addSitesRoute(SitesRouteEntity sitesRoute) {
        iSitesRouteRepository.addSitesRoute(sitesRoute);
    }

    @Override
    public List<SitesRouteEntity> findSitesRoute(String cityCode) {
        return iSitesRouteRepository.findSitesRoute(cityCode);
    }

    @Override
    public SitesRouteEntity findSitesRouteDetail(String id) {
        return iSitesRouteRepository.findSitesRouteDetail(id);
    }

    @Override
    public void deleteSitesRoute(String id) {
        iSitesRouteRepository.deleteSitesRoute(id);
    }

    @Override
    public void deleteRouteSites(String routeId, String sitesId) {
        iSitesRouteRepository.deleteRouteSites(routeId,sitesId);

    }

    @Override
    public void changeSites(String routeId, String sitesId, Integer status) {
        iSitesRouteRepository.changeSites(routeId,sitesId,status);
    }

    @Override
    public void savePointRoute(RoutePointSitesEntity routePoint) {
        iSitesRouteRepository.savePointRoute(routePoint);
    }

    @Override
    public List<RoutePointSitesEntity> findPointRoute(String routeId) {
        return iSitesRouteRepository.findPointRoute(routeId);
    }
}
